import request from '@/utils/request'

// 管理员登录
export const userLogin = (params) => {
    return request.get('/user/login', { params })
}

// 会员登录
export const userHylogin = (params) => {
    return request.get('/user/hylogin', { params })
}

// 路由信息
export const menuIndex = (params) => {
    return request.get('/menu/index', { params })
}

// 首页数据、
export const shouyeIndex = () => {
    return request.get('/shouye/index')
}

// -----------------------------------------------------------------------------------------------------

// 会员数据
export const huiyuanIndex = (params) => {
    return request.get('/huiyuan/index', { params })
}

// 会员新增
export const huiyuanAdd = (data) => {
    return request.post('/huiyuan/add', data)
}

// 会员编辑
export const huiyuanUpdate = (data) => {
    return request.post('/huiyuan/update', data)
}

// 会员删除
export const huiyuanDelete = (params) => {
    return request.get('/huiyuan/delete', { params })
}

// -----------------------------------------------------------------------------------------------------

// 员工数据
export const yuangongIndex = (params) => {
    return request.get('/yuangong/index', { params })
}

// 员工新增
export const yuangongSave = (data) => {
    return request.post('/yuangong/save', data)
}

// 员工删除
export const yuangongDelete = (params) => {
    return request.get('/yuangong/delete', { params })
}

// -----------------------------------------------------------------------------------------------------

// 器材数据
export const qicaiIndex = (params) => {
    return request.get('/qicai/index', { params })
}

// 器材新增
export const qicaiSave = (data) => {
    return request.post('/qicai/save', data)
}

// 器材删除
export const qicaiDelete = (params) => {
    return request.get('/qicai/delete', { params })
}

// -----------------------------------------------------------------------------------------------------

// 课程数据
export const subjectIndex = (params) => {
    return request.get('/subject/index', { params })
}

// 课程新增，编辑
export const subjectSave = (data) => {
    return request.post('/subject/save', data)
}

// 课程删除
export const subjectShanchu = (params) => {
    return request.get('/subject/shanchu', { params })
}

// 全部教练
export const yuangongJl = () => {
    return request.get('/yuangong/jl')
}

// 课程报名信息
export const baomingIndex1 = (params) => {
    return request.get('/baoming/index1', { params })
}

// 会员报名课程
export const baomingAdd = (data) => {
    return request.post('/baoming/add', data)
}

// 会员已报名的课程信息
export const baomingIndex = (params) => {
    return request.get('/baoming/index', { params })
}

// 会员退课
export const baomingShanchu = (params) => {
    return request.get('/baoming/shanchu', { params })
}